From: Jasper St. Pierre Date: Mon, 6 Oct 2014 23:07:32 +0000 (-0700) Subject: userWidget: Respect the scale factor in the bin size we set X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2048 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=18f569280ce79cc9836e85b0a2919c4fa5613d2d;p=gnome-shell.git userWidget: Respect the scale factor in the bin size we set Otherwise, the widget will be too small on hi-DPI devices. Based on a patch by: Darcy Beurle https://bugzilla.gnome.org/show_bug.cgi?id=735419 --- diff --git a/js/ui/userWidget.js b/js/ui/userWidget.js index b16f9e336..314aae0ce 100644 --- a/js/ui/userWidget.js +++ b/js/ui/userWidget.js @@ -28,11 +28,12 @@ const Avatar = new Lang.Class({ styleClass: 'framed-user-icon' }); this._iconSize = params.iconSize; + let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; this.actor = new St.Bin({ style_class: params.styleClass, track_hover: params.reactive, reactive: params.reactive, - width: this._iconSize, - height: this._iconSize }); + width: this._iconSize * scaleFactor, + height: this._iconSize * scaleFactor }); }, setSensitive: function(sensitive) {